There are many applications in which it would be desirable to employ a machine to automatically recognize shapes or patterns existing in images which have been sensed and converted into some sort of matrix of electrical signals. Relatively specialized systems have been developed which employ particular algorithms, with at least limited success, to detect simple classes of shapes or patterns such as alphanumeric characters. (See, e.g. U.S. Pat. Nos. 3,846,754 to Oka; 3,196,398 to Baskin; 3,573,789 to Sharp; 3,761,876 to Flarety; 3,287,703 to Slotnick; and 3,899,771 to Saroga et al.) However, the extension of machine vision to industrial or military operations requiring the detection of a more general class of shapes and/or patterns has met with limited results.
Elaborate programs have been written for general purpose computers to perform pattern analysis and classification. These systems have met with limited success due to the extremely long processing times associated with processing images having a large number of data points on a general purpose computer.
In order to greatly reduce processing time, a number of high speed, special purpose image processing machines have been developed. For example, U.S. Pat. No. 4,445,137, issued to Panofsky, discloses an image data processing system comprising a multi-stage digital delay circuit for modifying a serial stream of image data in accordance with a pre-selected algorithm. The Panofsky system utilizes a series of masks which may be logically combined on a bit by bit basis with the image stream to determine the degrees of correspondence between a known standard part geometry and the test parts being inspected by the system. It should be noted, however, that this system requires that the test parts appearing in the image frame be in the exact PG,5 position of the standard object in the mask frame in order for the correspondence results to be valid.
Accordingly, it is an object of the present invention to provide a method and apparatus for automatic shape recognition which is generally applicable to any shapes and/or patterns.
It is another object of this invention to provide a method for recognizing and detecting the existance of predetermined shape at any location within a particular image frame.
It is a further object of the present invention to provide a method and apparatus for automatic shape and/or pattern detection which utilizes basic set theory operations and the image algebra operation of erosion to determine whether the particular shape and/or pattern is present in a binary or gray scale image.